package kazan.fujitsu.lab.l11;

import static org.junit.Assert.assertEquals;
import kazan.fujitsu.lab.l11.model.Data;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;



public class Tests {

	static Data d1;
	static Data d2;
	MainSolutionImpl m;
    
    @BeforeClass
    public static void setUpOnce() {
    
	    d1 = new Data(1,5,8,10);
	    d2 = new Data(1,5,3,7);
    }
    
    @Before
    public void setUp() {
    
	    m = new MainSolutionImpl();
    }
    
    @Test
    public void testSolve() throws Exception {
    	m.solve(d1);
	    assertEquals("Test solve", "NO", m.getResult());
	    m.solve(d2);
	    assertEquals("Test solve", "YES", m.getResult());
    }
    
    
    
    @After
    public void tearDown() {
    
    }
    
    @AfterClass
    public static void tearDownOnce() {
    
    }

}
